Program_name=hf.int

F90srcs = program.f90 INTXC_MOD.f90 INT_BASIS.f90 Transint.f90 Output.f90 CC.f90 Initial_guess.f90 Perturbation.f90 UHF.f90 ROHF.f90 uhfm.f90 Gradient.f90 RHF.f90 damping.f90\

F90objs = $(F90srcs:.f90=.o)
F77objs = $(F77srcs:.F=.o)
LIB = INT_LIBCINT.a


MKLROOT = /home/zxqu/intel/compilers_and_libraries_2019.1.144/linux/mkl

Complier1=ifort
Complier2=gfortran

Link=-o

#192.9.200.120 with intel mkl
#FLIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm  -lblas

#59.72.122.148 with GNU, gfortran only
FLIB = -L -m64 -lblas -llapack
#FLIB =  -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl

#mac OS with intel mkl
#FLIB = -L${MKLROOT}/lib -Wl,-rpath,${MKLROOT}/lib -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl

$(Program_name):$(F90objs) $(F77objs)
	$(Complier2) $(Link) $(Program_name) $(F90objs) $(F77objs) $(LIB) $(FLIB)

.SUFFIXES : .F .f90 .o

.f90.o:
	$(Complier2) -O2 -g -c $<

.F.o:
	$(Complier2) -O2 -g -c $<

.PHONY:clean
clean : 
	rm -rf *.o *.mod
